package org.thread.test00.demo08.t02;

/**
 * @author ZQX
 * @date 2025-03-13
 */
public class MyRunnable implements Runnable {

    /**
     * 帐号
     */
    private Account account;

    /**
     * 取钱用户
     */
    private String user;

    /**
     * 取钱金额
     */
    private double money;

    /**
     * 锁对象 - 唯一性
     */
    private static final Object LOCK = new Object();

    public MyRunnable() {
    }

    public MyRunnable(Account account, String user, double money) {
        this.account = account;
        this.user = user;
        this.money = money;
    }



    @Override
    public void run() {
        account.getMoney(user, money);
    }
}
